<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" import="java.util.*,java.io.*,java.sql.*,java.text.*, dbAccess.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Admin Remove Admin</title>
<link rel="stylesheet" type="text/css" href="css_files/style.css" />
</head>
<body>
<table width="100%" border="1" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="178" height="125" valign="top"><img src="images/caduceus.gif" alt="" name="LogoLeft" width="150" height="125" id="LogoLeft" style="background-color: #0033FF" /></td>
    <td width="616" align="center" valign="middle"><h1 align="center">HOSPITAL NAME </h1></td>
    <td width="231" valign="top"><img src="images/hospital.jpg" alt="" name="LogoRight" width="180" height="119" id="LogoRight" style="background-color: #0033FF" /></td>
  </tr>
  <tr>
    <td height="19" colspan="2" valign="top">Welcome Admin. <%=session.getAttribute("Name")%>&nbsp;<%=new java.util.Date() %></td>
  	<td><a href="home.jsp" title="Logout">Logout</a></td>
  </tr>
</table>

<table width="100%" height="34" border="1" align="left">
      <thead>
        <tr>
          <td width="80"><div align="center"><strong>Doctor Id</strong></div></td>
          <td width="80"><div align="center"><strong>Doctor First Name</strong></div></td>
          <td width="80"><div align="center"><strong>Doctor Last Name</strong></div></td>
          <td width="80"><div align="center"><strong>Email Address</strong></div></td>
          <td width="80"><div align="center"><strong>Gender</strong></div></td>
          <td width="80"><div align="center"><strong>Date of Birth</strong></div></td>
          <td width="80"><div align="center"><strong>Phone</strong></div></td>
          <td width="80"><div align="center"><strong>Building</strong></div></td>
          <td width="80"><div align="center"><strong>Room</strong></div></td>
          <td width="80"><div align="center"><strong>Home Address</strong></div></td>
          <td width="80"><div align="center"><strong>Update</strong></div></td>
          
         </tr>
        </thead>
        <tbody>
        <%
        
        Login lgn = new Login();
		ResultSet rs;
		int Id = 0;
		String FirstName = "unknown";
		String LastName = "unknown";
		String emailAddress = "unknown";
		String gender = "unknown";
		String dateOfBirth= "unknown";
		String phone = "unknown";
		String building = "unknown";
		String room = "unknown";
		String homeAddress = "unknown";
		String password = "unknown";		

		rs = lgn.getDoctorList("Admin");
		if (rs != null)
		{
			while (rs.next())
			{
				Id = rs.getInt("tbl_doctor.DocId");
				FirstName = rs.getString("tbl_doctor.FirstName");
				LastName = rs.getString("tbl_doctor.LastName");
				emailAddress = rs.getString("tbl_doctor.EmailAddress");
				gender = rs.getString("tbl_doctor.Gender");
				phone = rs.getString("tbl_doctor.Phone");
				homeAddress = rs.getString("tbl_doctor.HomeAddress");
				password = rs.getString("tbl_doctor.Password");
				dateOfBirth = rs.getString("tbl_doctor.DateOfBirth");
				room = rs.getString("tbl_doctor.DocRoom");
				building = rs.getString("tbl_doctor.DocBuilding");
				
        	%>
        		<tr>				
        			<td>
        				<%=Id%>
        			</td>
        			<td>
        				<%=FirstName%>
        			</td>
        			<td>
        				<%=LastName%>
        			</td>
        			<td>
        				<%=emailAddress%>
        			</td>
        			<td>
        				<%=gender%>
        			</td>
        			<td>
        				<%=dateOfBirth%>
        			</td>
        			<td>
        				<%=phone%>
        			</td>
        			<td>
        				<%=building%>
        			</td>
        			<td>
        				<%=room%>
        			</td>
        			<td>
        				<%=homeAddress%>
        			</td>
        			<td>        				
        			<form name="removeAdmin" method="post" action="docPatientAccessRemoveStep2.jsp?doc2Id=<%=Id%>&doc1Id=<%=session.getAttribute("docId")%>">
        					<input name="adminRemove" type="submit" id="adminRemove" value="Remove Access" />
        			</form>
        			</td>
        		</tr>
        		
        	<%
			}
		}
        %>
        </tbody>
      </table>      
</body>
</html>